-- GENERATED SPELL FOR [Dark Rune Worker] --


function spell0_27961(pUnit, Event) --@Disgruntled Anger,Self--
pUnit:FullCastSpellOnTarget(51499,pUnit)
pUnit:RegisterEvent('Sorts_27961', 0, 1)
end

function spell1_27961(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(46202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27961', 10000, 1)
end

function Sorts_27961(pUnit, Event)
local choix_sorts_27961 = math.random(0, 1)
if choix_sorts_27961 == 0 then
pUnit:RegisterEvent('spell0_27961', 1, 1)
end
if choix_sorts_27961 == 1 then
pUnit:RegisterEvent('spell1_27961', 1, 1)
end
end

function mob27961_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27961', math.random(1500, 3000), 1)
end

function mob27961_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27961_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27961_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27961, 1, 'mob27961_Action')
RegisterUnitEvent(27961, 2, 'mob27961_Leave')
RegisterUnitEvent(27961, 3, 'mob27961_Kill')
RegisterUnitEvent(27961, 4, 'mob27961_Die')
